//2009/10/25 19:16:10
#include <string>
#include <iostream>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class RedSquare
{
public:
	int countTheEmptyReds(int maxRank, int maxFile, vector <int> rank, vector <int> file)
	{
		vector<string> v(maxRank, string(maxFile, 'R'));
		for(int i=0; i<maxRank; i++)
		{
			for(int j=0; j<maxFile; j++)
			{
				if(maxFile%2==1 && (i+j)%2==0)
					v[i][j] = 'b';
				else if(maxFile%2==0 && (i+j)%2==1)
					v[i][j] = 'b';
			}
		}
		for(int i=0; i<maxRank; i++)
		{
			for(int j=0; j<maxFile; j++)
			{
				cout << v[i][j] << ",";
			}
			cout << endl;
		}
		for(int i=0; i<rank.size(); i++)
			v[rank[i]-1][file[i]-1] = 'X';
		int count = 0;
		for(int i=0; i<v.size(); i++)
			for(int j=0; j<v[i].size(); j++)
				if(v[i][j] == 'R')
					count ++;
		return count;
	}
};
